#!/bin/sh
#
# see: dh_installdeb(1)

set -e

# avoid cancelling of "stop" via socket or D-Bus activation
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
	systemctl mask --runtime bonescript.socket || true
	systemctl mask --runtime bonescript-autorun.service || true
	# stop ${service}.service manually since invoke-rc.d currently doesn't
	# deal with masked services (see Bug #717109)
	systemctl stop bonescript.socket || true
	systemctl stop bonescript-autorun.service || true
fi

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
